{% extends "base.html" %}
{% block title %}B1 Patch{% endblock %}
{% block content %}
<script type= text/javascript>
    $(document).ready(function(){
        $("#accordion").accordion({clearStyle: true});
        $('.ui-accordion').bind('accordionchange', function(event, ui) {
              //ui.newHeader // jQuery object, activated header
              //ui.oldHeader // jQuery object, previous header
              //ui.newContent // jQuery object, activated content
              //ui.oldContent // jQuery object, previous content
              var url = $(ui.newHeader).find("a").attr("href");
              ui.newContent.load(url);
              $('.selector').accordion('option', 'autoHeight', false);
            });
    });
</script>
<h2>{{patch.PatchName}}: {{patch.PatchStatus}}</h2>
<div id="accordion">
    {% for s in status %}
           <h3><a href="/patch/{{patch.PatchId}}/{{s.StatusId}}">{{s.StatusName}}: {{s.Count}}</a></h3>
           <div id = "patch-{{patch.PatchId}}-{{s.StatusId}}"><p/></div>
    {% endfor %}
</div>
{% endblock %}
